<div class="col-md-3 hidden-xs right-sidebar">
    @inject('widget', 'App\Http\Controllers\Blog\WidgetController')
    <div class="widget">
        <form action="{{ route('article.search') }}" method="post" accept-charset="utf-8" target="_blank">
            <i class="glyphicon glyphicon-search search-icon"></i>
            <input type="search" class="search-input" name="q" maxlength="20" placeholder="搜索"
                   value="{{ isset($q) ? $q : '' }}">
            {{ csrf_field() }}
        </form>
    </div>
{{--    <div class="widget clock">
        @include('blog.widget.clock')
    </div>--}}
    <div class="widget">
        <div class="widget-title">
            <i class="glyphicon glyphicon-book"></i> 最近文章
        </div>
        <ul class="widget-content-title">
            @foreach($widget->recentArticle() as $article)
            <li><a href="{{ $article->link() }}">{{ make_excerpt($article->title, 32) }}</a></li>
            @endforeach
        </ul>
    </div>
    <div class="widget">
        <div class="widget-title">
            <i class="glyphicon glyphicon-list"></i> 分类
        </div>
        <ul class="widget-content-title">
            @foreach($widget->categoryList() as $category)
                <li><a href="{{ $category->link() }}">{{ make_excerpt($category->name, 32) }}</a></li>
            @endforeach
        </ul>
    </div>
    {{--<div class="widget">
        <div class="widget-title">
            <i class="glyphicon glyphicon-book"></i>
            友情链接
        </div>
        <ul class="widget-content-title">
            <li></li>
        </ul>
    </div>--}}
</div>